module.exports = function(window, document) {
	var apivm = require('../../common/avm.min')(window, document);
	var avm = apivm;
	var api = apivm.api;
	var Component = apivm.Component;
	var $ = apivm.$;
	(function() {
	var Event = /*@__PURE__*/ (function(Component) {
		function Event(props) {
			Component.call(this, props);
			this.data = {
				num: 0
			};
		}

		if (Component) Event.__proto__ = Component;
		Event.prototype = Object.create(Component && Component.prototype);
		Event.prototype.constructor = Event;
		Event.prototype.apiready = function() {};
		Event.prototype.add = function(event) {
			console.log(event);
			this.data.num++;
		};
		Event.prototype.clickFn = function(event) {
			console.log(event.currentTarget.dataset.xx);
		};
		Event.prototype.render = function() {
			return apivm.h(
				"view",
				{class: "page"},
				apivm.h("view", {class: "box", onClick: this.add}, "点击：", this.data.num),
				apivm.h("view", {class: "box", onClick: this.add}, "点击：", this.data.num),
				apivm.h("view", {class: "box", onclick: this.add}, "点击：", this.data.num),
				apivm.h("view", {"data-xx": "老陈", onClick: this.clickFn}, "自定义数据")
			);
		};

		return Event;
	})(Component);
	apivm.define("event", Event);
	apivm.render(apivm.h("event", null), "body");
})();

	window['createApp'] = function() {
		apivm.$_start();
	}
	return avm;
}